package com.izhengyin.miaosha.service;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface QueuingService {
    /**
     * 入队
     * @param itemId 商品ID
     * @param queuingNumber 排队号
     * @return
     */
    Mono<Boolean> enqueue(long itemId,String queuingNumber);

    /**
     * 出队
     * @param itemId 商品ID
     * @param size 获取排队号的数量
     * @return
     */
    Flux<String> dequeue(long itemId , int size);
}
